export default function calcOffsetPosition (node) {
    var offset = {
        left: 0,
        top: 0
    }
    var pNode = node
    while (pNode && pNode.tagName !== 'BODY') {
        offset.left += pNode.offsetLeft
        offset.top += pNode.offsetTop
        pNode = pNode.offsetParent
    }
    return offset
}
